* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 上传区域 */
.upload-section {
    text-align: center;
    margin-bottom: 20px;
}

.upload-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.file-name {
    color: white;
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 500;
}

/* 工具栏 */
.toolbar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.toolbar-left, .toolbar-center, .toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

#pageInfo {
    font-weight: 600;
    color: #333;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 查看器容器 */
.viewer-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 欢迎页面 */
.welcome {
    text-align: center;
    max-width: 600px;
}

.welcome-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.welcome h2 {
    color: #333;
    margin-bottom: 15px;
}

.welcome p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 25px;
}

.features {
    list-style: none;
    text-align: left;
    display: inline-block;
}

.features li {
    color: #555;
    font-size: 1em;
    margin: 10px 0;
    padding-left: 10px;
}

/* 页面查看器 */
.page-viewer {
    width: 100%;
    text-align: center;
}

.page-viewer img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingMessage {
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
}

/* 统计信息 */
.stats {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    color: #667eea;
    font-size: 2em;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .toolbar-left, .toolbar-center, .toolbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
}
